package com.etbsms.form;

import java.util.Date;
import java.util.List;

import com.etbsms.domain.Role;
import com.etbsms.domain.Users;

public class UsersForm {
	
	public UsersForm(){}
	
	public UsersForm(List<Role> role){
		this.roles = new String[role.size()];		
		for(int i = 0;i < role.size();i++){
			this.roles[i] = role.get(i).getName();
		}		
	}
	
	public UsersForm(Users users){
		this.seq_no = users.getSeq_no();
		this.username = users.getUsername();
		this.password = users.getPassword();
		this.fullname = users.getFullname();
		this.email = users.getEmail();
		this.row_per_page = users.getRow_per_page();
	}
	
	private int seq_no;
	private String username;
	private String password;
	private String new_password;	
	private String fullname;
	private String email;	
	private int row_per_page;	
	private boolean enabled;
	private Date created;
	private String[] roles;
	private String roleItems;
	
	public int getSeq_no() {
		return seq_no;
	}
	public void setSeq_no(int seq_no) {
		this.seq_no = seq_no;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getFullname() {
		return fullname;
	}
	public void setFullname(String fullname) {
		this.fullname = fullname;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public boolean isEnabled() {
		return enabled;
	}
	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}
	public Date getCreated() {
		return created;
	}
	public void setCreated(Date created) {
		this.created = created;
	}
	public String[] getRoles() {
		return roles;
	}
	public void setRoles(String[] roles) {
		this.roles = roles;
	}

	public String getRoleItems() {
		return roleItems;
	}

	public void setRoleItems(String roleItems) {
		this.roleItems = roleItems;
	}

	public int getRow_per_page() {
		return row_per_page;
	}

	public void setRow_per_page(int row_per_page) {
		this.row_per_page = row_per_page;
	}

	public String getNew_password() {
		return new_password;
	}

	public void setNew_password(String new_password) {
		this.new_password = new_password;
	}
	
}
